import { connect } from 'react-redux';
import SignInScreen from '../pages/SignInScreen';
import { getUserInfo } from '../redux/actions/user';

const mapStateToProps = (state, props) => {
  return {
    userInfo: state.user.userInfo,
  };
};

const mapDispatchToProps = (dispatch, props) => {
  return {
    getUserInfoSaga() {
      dispatch(getUserInfo());
    },
  };
};

const SignInContainer = connect(
  mapStateToProps,
  mapDispatchToProps,
)(SignInScreen);

export default SignInContainer;
